//-------------------------------------------------------------------
//	Copyright (c) 2012-2014 Zhirnov Andrey
//	This file is part of the "UXGEN-ES" project.
//	See copyright notice in "Engine.h".
//-------------------------------------------------------------------

#pragma once

#include "UI/Types/Types.h"
#include "UI/Types/UITexture.h"

namespace Engine
{
namespace UI
{


	//
	// UI Material (for Widgets)
	//

	struct UIMaterial : public Graphics::BatchMaterial
	{
	// types
	private:
		typedef Graphics::BatchMaterial		Mtr;


	// methods
	public:
		UIMaterial ()
		{}

		Mtr const &	Get ()
		{
			ResetTextures();
			return *this;
		}

		Mtr const & Get (const UITexture &tex0, const SamplerOptional_t &samp0 = SamplerOptional_t())
		{
			ResetTextures();
			SetTexture( 0, tex0.Texture(), samp0 );
			return *this;
		}
		
		Mtr const & Get (const UITexture &tex0, const SamplerOptional_t &samp0,
						 const UITexture &tex1, const SamplerOptional_t &samp1)
		{
			ResetTextures();
			SetTexture( 0, tex0.Texture(), samp0 );
			SetTexture( 0, tex1.Texture(), samp1 );
			return *this;
		}
	};


}	// UI
}	// Engine